//package com.lagou.esweb.config;
//
//import org.beetl.sql.core.ConnectionSourceHelper;
//import org.beetl.sql.core.SQLManager;
//import org.beetl.sql.core.db.MySqlStyle;
//import org.beetl.sql.ext.DebugInterceptor;
//import org.beetl.sql.ext.TimeStatInterceptor;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//import javax.sql.DataSource;
//
//@Configuration
//public class CommonConfig {
//
//    @Bean
//    public SQLManager sqlManager(DataSource dataSource) {
//        return SQLManager.newBuilder(ConnectionSourceHelper.getSingle(dataSource))
//                .addInterceptor(new DebugInterceptor())
//                .addInterceptor(new TimeStatInterceptor(1))
//                .setDbStyle(new MySqlStyle())
//                .build();
//    }
//
//}
